/*
** Bundled memory allocator.
** Donated to the public domain.
*/

#ifndef _LJ_ALLOC_H
#define _LJ_ALLOC_H

#include "lj_def.h"

#ifndef LUAJIT_USE_SYSMALLOC
LJ_FUNC void *lj_alloc_create(PRNGState *rs);
LJ_FUNC void lj_alloc_setprng(void *msp, PRNGState *rs);
LJ_FUNC void lj_alloc_destroy(void *msp);
LJ_FUNC void *lj_alloc_f(void *msp, void *ptr, size_t osize, size_t nsize);
LJ_FUNC void lj_alloc_get_stats(void *msp, size_t *total_segments, size_t *total_segment_size, 
                               size_t *used_memory, size_t *free_memory, size_t *top_size, size_t *dv_size);
#endif

#endif
